home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / rayshade / Makefile.SH < prev    next >
Makefile  |  1991-08-08  |  3KB  |  132 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. #
  24. # Makefile for rayshade.
  25. #
  26. # Craig Kolb
  27. #
  28. # \$Id: Makefile.SH,v 4.0 91/07/17 14:50:30 kolb Exp Locker: kolb $
  29. #
  30. # Bin directory
  31. #
  32. BINDIR = $bin 
  33. OPTIMIZE = $optimize
  34. URTINC = $urtinc
  35. CCFLAGS = $ccflags $large
  36. URTLIB = $urtlib
  37. LDFLAGS = $libs $ldflags
  38. CC = $cc
  39. MKDEP = $mkdep
  40. YACC = $yacc
  41. CLC = $lindacc
  42.  
  43. !GROK!THIS!
  44.  
  45. : In the following dollars and backticks do not need the extra backslash.
  46. $spitshell >>Makefile <<'!NO!SUBS!'
  47. LIBRAYDIR = ../libray
  48. LIBSHADEDIR = ../libshade
  49. INCLUDE = -I$(LIBRAYDIR) -I$(LIBSHADEDIR) -I.. $(URTINC)
  50. YFLAGS = -d
  51.  
  52. LIBRAY = $(LIBRAYDIR)/libray.a
  53. LIBSHADE = $(LIBSHADEDIR)/libshade.a
  54.  
  55. #
  56. # If you are using LINDA, add -DLINDA
  57. # If you are running 'tsnet'-style LINDA, add -DTSNET
  58. # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  59.  
  60. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  61.  
  62. #
  63. # C-Linda flags, if appropriate
  64. #CLFLAGS = -linda ts 20000
  65. #
  66.  
  67. SHELL = /bin/sh
  68.  
  69. LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)
  70.  
  71. DRIVE_C =    main.c raytrace.c version.c
  72.  
  73. DRIVE_H =    raytrace.h
  74.  
  75. DRIVE_O = $(DRIVE_C:.c=.o)
  76.  
  77. HFILES = $(DRIVE_H)
  78.  
  79. CFILES = $(DRIVE_C)
  80.  
  81. SHFILES = Makefile.SH
  82.  
  83. OBJ = $(DRIVE_O)
  84.  
  85. DEPENDSRC = $(DRIVE_C)
  86.  
  87. #
  88. # Change $(CC) below to $(CLC) if using Linda.
  89. #
  90. rayshade: $(OBJ) $(LIBS)
  91.     $(CC) $(OPTIMIZE) -o rayshade $(OBJ) $(LIBS) $(LDFLAGS)
  92.  
  93. #
  94. # Uncomment the following rule if using Linda.
  95. #
  96. #raytrace.lo: raytrace.cl
  97. #    $(CLC) $(INCLUDE) $(LCFLAGS) -c raytrace.cl
  98.  
  99. #
  100. # End of configuration section
  101. #
  102. install:    rayshade
  103.         mv rayshade $(BINDIR)/rayshade
  104.  
  105. clean:
  106.     rm -f $(OBJ) core
  107.  
  108. realclean:
  109.     rm -f $(OBJ) core y.tab.h
  110.     rm -f *.orig Makefile
  111.  
  112. lint:
  113.     lint $(CFLAGS) -x $(CFILES) -lm
  114.  
  115. tags:
  116.     ctags -t $(CFILES)
  117.  
  118. depend:
  119.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  120.      $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
  121.     ) >Makefile.new
  122.     cp Makefile Makefile.bak
  123.     cp Makefile.new Makefile
  124.     rm -f Makefile.new
  125.  
  126.  
  127. # DO NOT DELETE THIS LINE
  128. !NO!SUBS!
  129. chmod 755 Makefile
  130. $eunicefix Makefile
  131.